package org.yellow.backend.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.yellow.backend.pojo.patient;
import org.yellow.backend.service.blacklistService;

/**
 * @author: hy
 * @create: 2024-01-01
 */
@Slf4j
@RestController
@SuppressWarnings({"all"})
@RequestMapping("/blacklist")
public class blacklistController {
    @Autowired
    private blacklistService service;

    @GetMapping("/confirm/{name}")
    public boolean confirmedBlacklist(@PathVariable("name") String name){
        log.info("确认"+name+"是否被列入黑名单");
        return service.confirmedBlacklist(name);
    }

    @PostMapping("/insert")
    public boolean insertNew(@RequestBody patient patient){
        return service.insertNew(patient);
    }
}
